package com.cxz.food.controller;

import com.cxz.food.domain.Business;
import com.cxz.food.domain.Response;
import com.cxz.food.service.BusinessService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/business")
public class BusinessController {

    @Autowired
    private BusinessService businessService;

    @RequestMapping("/get")
    public Response getBusinessList(){

        List<Business> businesses = businessService.getBusinessList();

        return new Response(200,"获取成功",businesses);

    }


}
